package com.woniuxy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//住院病人
public class Inpatient {
    //住院id
    private int inpatientId;
    //病人信息
    private String inpatientName;
    private String inpatientGender;
    private int inpatientAge;
    //病情描述
    private String inpatientIllness;
    //床位
    private String bed;
    //医生id
    private int doctorId;
    //住院日期
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date inpatientTime;
    //医生
    private Doctor doctor;

    public Inpatient() {
    }

    public Inpatient(String inpatientName, String inpatientGender, int inpatientAge, String inpatientIllness, String bed, int doctorId, Date inpatientTime) {
        this.inpatientName = inpatientName;
        this.inpatientGender = inpatientGender;
        this.inpatientAge = inpatientAge;
        this.inpatientIllness = inpatientIllness;
        this.bed = bed;
        this.doctorId = doctorId;
        this.inpatientTime = inpatientTime;
    }

    public int getInpatientId() {
        return inpatientId;
    }

    public void setInpatientId(int inpatientId) {
        this.inpatientId = inpatientId;
    }

    public String getInpatientName() {
        return inpatientName;
    }

    public void setInpatientName(String inpatientName) {
        this.inpatientName = inpatientName;
    }

    public String getInpatientGender() {
        return inpatientGender;
    }

    public void setInpatientGender(String inpatientGender) {
        this.inpatientGender = inpatientGender;
    }

    public int getInpatientAge() {
        return inpatientAge;
    }

    public void setInpatientAge(int inpatientAge) {
        this.inpatientAge = inpatientAge;
    }

    public String getInpatientIllness() {
        return inpatientIllness;
    }

    public void setInpatientIllness(String inpatientIllness) {
        this.inpatientIllness = inpatientIllness;
    }

    public String getBed() {
        return bed;
    }

    public void setBed(String bed) {
        this.bed = bed;
    }

    public int getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(int doctorId) {
        this.doctorId = doctorId;
    }

    public Date getInpatientTime() {
        return inpatientTime;
    }

    public void setInpatientTime(Date inpatientTime) {
        this.inpatientTime = inpatientTime;
    }

    public Doctor getDoctor() {
        return doctor;
    }

    public void setDoctor(Doctor doctor) {
        this.doctor = doctor;
    }

    @Override
    public String toString() {
        return "Inpatient{" +
                "inpatientId=" + inpatientId +
                ", inpatientName='" + inpatientName + '\'' +
                ", inpatientGender='" + inpatientGender + '\'' +
                ", inpatientAge=" + inpatientAge +
                ", inpatientIllness='" + inpatientIllness + '\'' +
                ", bed='" + bed + '\'' +
                ", doctorId=" + doctorId +
                ", inpatientTime=" + inpatientTime +
                ", doctor=" + doctor +
                '}';
    }
}
